<template>
<div>
    <span class="username">用户名:</span><input v-model="loginform.username"><br/><br/>
    <span class="passwd">密码:</span><input class=inputpd v-model="loginform.password" type="password"><br/><br/>
    <span class="button"><input type="button" value="登录" @click="func">
        <input type="button" value="重置" @click="func"></span>
</div>
</template>

<script setup>
    import { reactive } from 'vue';
    const loginform=reactive({
        username:"",
        password:""
    })
    function func()
    {
        loginform.password="";
        loginform.username="";
    }
</script>
<style scoped>
    .inputpd{
        margin-left: 16px;
    }
    .username{
        padding-left: 550px;
    }
    .passwd{
        padding-left: 550px;
    }
    .button{
        padding-left: 550px;
    }
</style>